<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for循环</title>
    <script src="/js/vue.js"></script>
</head>
<body>
<div id="app">
    <p>v-for 可以循环获取数组中的元素，也可以获取到下标</p>
    <ul>
        <li v-for="(v,i) in arr">{{i+1}}  :  {{v}}</li>
    </ul>
</div>
<script>
    new Vue({
        el: "#app",
        data: {
            arr: ["董晨旭", "菲菲", "开心"]
        }
    });
</script>
</body>
</html>